/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package 解析.node.charproperty.支持补集;

import 解析.node.charproperty.CharProperty;

/**
 *
 * @author yanxi
 */
public abstract class CharProperty支持补集 extends CharProperty{
    public boolean isComplement=false;
    
    public CharProperty支持补集 complement() {
        this.isComplement=true;
        return this;
    }
    
    @Override
    public boolean isSatisfiedBy(int ch) {
        return isComplement?!isSatisfiedBy正集(ch):isSatisfiedBy正集(ch);
    }
    
    @Override
    public String toString(){
        return isComplement?toString补集():toString正集();
    }
    
    public abstract boolean isSatisfiedBy正集(int ch); 
    public abstract String toString正集();
    public abstract String toString补集();
}
